home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagd_f.zip / DRIVES.SWG / 0032_Get Number of CD-ROMS.pas < prev    next >
Pascal/Delphi Source File  |  1993-08-18  |  855b  |  28 lines

  1. { Gets the number of installed CD-ROM drives in a system.
  2.   Part of the Heartware Toolkit v2.00 (HTdisk.PAS) for Turbo Pascal.
  3.   Author: Jose Almeida. P.O.Box 4185. 1504 Lisboa Codex. Portugal.
  4.           I can also be reached at RIME network, site ->TIB or #5314.
  5.   Feel completely free to use this source code in any way you want, and, if
  6.   you do, please don't forget to mention my name, and, give me and Swag the
  7.   proper credits. }
  8.  
  9. FUNCTION CD_ROM_Units : byte;
  10.  
  11. { DESCRIPTION:
  12.     Gets the number of installed CD-ROM drives in a system.
  13.   SAMPLE CALL:
  14.     NB := CD_ROM_Units;
  15.   RETURNS:
  16.     0    : driver not installed
  17.     else : number of CD-ROM units }
  18.  
  19. var
  20.   HTregs : registers;
  21.  
  22. BEGIN { CD_ROM_Units }
  23.   HTregs.AX := $1500;
  24.   HTregs.BX := $0000;
  25.   Intr($2F,HTregs);
  26.   CD_ROM_Units := HTregs.BL;
  27. END; { CD_ROM_Units }
  28.